import { Component, OnInit, Input } from '@angular/core';
import { ActivatedRoute, ParamMap } from '@angular/router';
import { switchMap, map } from 'rxjs/operators';
import { CustomService } from '../custom.service';
@Component({
    templateUrl: './custom-tasklist.component.html',
    styleUrls: ['./custom-tasklist.component.scss'],
    providers: []
})
export class CustomTaskListComponent implements OnInit {
    bizId: number = 0;
    taskListGroupId: number = 0;

    constructor(
        private route: ActivatedRoute,
        private customService: CustomService
    ) { }

    ngOnInit() {
        this.route.paramMap.pipe(
            switchMap(params => {
                this.bizId = +params.get('bizId');
                this.taskListGroupId = +params.get('taskListGroupId')
                return this.customService.loadCustomTables()
            })
        ).subscribe(data => console.log());
    }

}
